home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / thinkref / archive / THINKPascalUH2.1.sea / THINKPas Univ Hdr 2.1 / Interfaces / CMICCProfile.p < prev    next >
Text File  |  1995-09-12  |  22KB  |  663 lines

  1. { Converted with MPW2TPas Tuesday, September 12, 1995 5:26:32 PM }
  2. {
  3.      File:        CMICCProfile.p
  4.  
  5.      Contains:    Definitions for ColorSync 2.0 profile
  6.  
  7.      Version:    Technology:    ColorSync 2.0
  8.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  9.  
  10.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  14.                  stack.  Include the file and version information (from above)
  15.                  in the problem description and send to:
  16.                      Internet:    apple.bugs@applelink.apple.com
  17.                      AppleLink:    APPLE.BUGS
  18.  
  19. }
  20.  
  21.  UNIT CMICCProfile;
  22.  INTERFACE
  23.  
  24.  
  25. {$IFC UNDEFINED __CMICCPROFILE__}
  26. {$SETC __CMICCPROFILE__ := 1}
  27.  
  28.   USES
  29.    ConditionalMacros, Types;
  30.  
  31. { $PUSH}
  32. { $ALIGN MAC68K}
  33. { $LibExport+}
  34.  
  35. CONST
  36.     cmCS2ProfileVersion            = $02000000;
  37.  
  38. { Current Major version number }
  39.     cmCurrentProfileMajorVersion = $02000000;
  40.  
  41. { magic cookie number for anonymous file ID }
  42.     cmMagicNumber                = 'acsp';
  43.  
  44. { ColorSync profile version 1.0 }
  45.     cmCS1ProfileVersion            = $00000100;
  46.  
  47. {**********************************************************************}
  48. {************** ColorSync 2.0 profile specification *******************}
  49. {**********************************************************************}
  50. { profile flags element values }
  51.     cmEmbeddedProfile            = 0;                            { 0 is not embedded profile, 1 is embedded profile }
  52.     cmEmbeddedUse                = 1;                            { 0 is to use anywhere, 1 is to use as embedded profile only }
  53.  
  54. { data type element values }
  55.     cmAsciiData                    = 0;
  56.     cmBinaryData                = 1;
  57.  
  58. { rendering intent element values  }
  59.     cmPerceptual                = 0;                            { Photographic images }
  60.     cmRelativeColorimetric        = 1;                            { Logo Colors }
  61.     cmSaturation                = 2;                            { Business graphics }
  62.     cmAbsoluteColorimetric        = 3;                            { Logo Colors }
  63.  
  64. { speed and quality flag options }
  65.     cmNormalMode                = 0;                            { it uses the least significent two bits in the high word of flag }
  66.     cmDraftMode                    = 1;                            { it should be evaulated like this: right shift 16 bits first, mask off the }
  67.     cmBestMode                    = 2;                            { high 14 bits, and then compare with the enum to determine the option value }
  68.  
  69. { device/media attributes element values  }
  70.     cmReflective                = 0;                            { 0 is reflective media, 1 is transparency media }
  71.     cmGlossy                    = 1;                            { 0 is glossy, 1 is matte }
  72.  
  73. { screen encodings  }
  74.     cmPrtrDefaultScreens        = 0;                            { Use printer default screens.  0 is false, 1 is ture }
  75.     cmLinesPer                    = 1;                            { 0 is LinesPerCm, 1 is LinesPerInch }
  76.  
  77. { 2.0 tag type information }
  78.     cmNumHeaderElements            = 10;
  79.  
  80. { public tags }
  81.     cmAToB0Tag                    = 'A2B0';
  82.     cmAToB1Tag                    = 'A2B1';
  83.     cmAToB2Tag                    = 'A2B2';
  84.     cmBlueColorantTag            = 'bXYZ';
  85.     cmBlueTRCTag                = 'bTRC';
  86.     cmBToA0Tag                    = 'B2A0';
  87.     cmBToA1Tag                    = 'B2A1';
  88.     cmBToA2Tag                    = 'B2A2';
  89.     cmCalibrationDateTimeTag    = 'calt';
  90.     cmCharTargetTag                = 'targ';
  91.     cmCopyrightTag                = 'cprt';
  92.     cmDeviceMfgDescTag            = 'dmnd';
  93.     cmDeviceModelDescTag        = 'dmdd';
  94.     cmGamutTag                    = 'gamt';
  95.     cmGrayTRCTag                = 'kTRC';
  96.     cmGreenColorantTag            = 'gXYZ';
  97.     cmGreenTRCTag                = 'gTRC';
  98.     cmLuminanceTag                = 'lumi';
  99.     cmMeasurementTag            = 'meas';
  100.     cmMediaBlackPointTag        = 'bkpt';
  101.     cmMediaWhitePointTag        = 'wtpt';
  102.     cmNamedColorTag                = 'ncol';
  103.     cmPreview0Tag                = 'pre0';
  104.     cmPreview1Tag                = 'pre1';
  105.     cmPreview2Tag                = 'pre2';
  106.     cmProfileDescriptionTag        = 'desc';
  107.     cmProfileSequenceDescTag    = 'pseq';
  108.     cmPS2CRD0Tag                = 'psd0';
  109.     cmPS2CRD1Tag                = 'psd1';
  110.     cmPS2CRD2Tag                = 'psd2';
  111.     cmPS2CRD3Tag                = 'psd3';
  112.     cmPS2CSATag                    = 'ps2s';
  113.     cmPS2RenderingIntentTag        = 'ps2i';
  114.     cmRedColorantTag            = 'rXYZ';
  115.     cmRedTRCTag                    = 'rTRC';
  116.     cmScreeningDescTag            = 'scrd';
  117.     cmScreeningTag                = 'scrn';
  118.     cmTechnologyTag                = 'tech';
  119.     cmUcrBgTag                    = 'bfd ';
  120.     cmViewingConditionsDescTag    = 'vued';
  121.     cmViewingConditionsTag        = 'view';
  122.  
  123. { custom tags }
  124.     cmPS2CRDVMSizeTag            = 'psvm';
  125.  
  126. { technology tag descriptions }
  127.     cmTechnologyFilmScanner        = 'fscn';
  128.     cmTechnologyReflectiveScanner = 'rscn';
  129.     cmTechnologyInkJetPrinter    = 'ijet';
  130.     cmTechnologyThermalWaxPrinter = 'twax';
  131.     cmTechnologyElectrophotographicPrinter = 'epho';
  132.     cmTechnologyElectrostaticPrinter = 'esta';
  133.     cmTechnologyDyeSublimationPrinter = 'dsub';
  134.     cmTechnologyPhotographicPaperPrinter = 'rpho';
  135.     cmTechnologyFilmWriter        = 'fprn';
  136.     cmTechnologyVideoMonitor    = 'vidm';
  137.     cmTechnologyVideoCamera        = 'vidc';
  138.     cmTechnologyProjectionTelevision = 'pjtv';
  139.     cmTechnologyCRTDisplay        = 'CRT ';
  140.     cmTechnologyPMDisplay        = 'PMD ';
  141.     cmTechnologyAMDisplay        = 'AMD ';
  142.     cmTechnologyPhotoCD            = 'KPCD';
  143.     cmTechnologyPhotoImageSetter = 'imgs';
  144.     cmTechnologyGravure            = 'grav';
  145.     cmTechnologyOffsetLithography = 'offs';
  146.     cmTechnologySilkscreen        = 'silk';
  147.     cmTechnologyFlexography        = 'flex';
  148.  
  149. { type signatures }
  150.     cmSigCurveType                = 'curv';
  151.     cmSigDataType                = 'data';
  152.     cmSigDateTimeType            = 'dtim';
  153.     cmSigLut16Type                = 'mft2';
  154.     cmSigLut8Type                = 'mft1';
  155.     cmSigMeasurementType        = 'meas';
  156.     cmSigNamedColorType            = 'ncol';
  157.     cmSigProfileDescriptionType    = 'desc';
  158.     cmSigScreeningType            = 'scrn';
  159.     cmSigS15Fixed16Type            = 'sf32';
  160.     cmSigSignatureType            = 'sig ';
  161.     cmSigTextType                = 'text';
  162.     cmSigU16Fixed16Type            = 'uf32';
  163.     cmSigU1Fixed15Type            = 'uf16';
  164.     cmSigUInt32Type                = 'ui32';
  165.     cmSigUInt64Type                = 'ui64';
  166.     cmSigUInt8Type                = 'ui08';
  167.     cmSigViewingConditionsType    = 'view';
  168.     cmSigXYZType                = 'XYZ ';
  169.  
  170. { Measurement type encodings }
  171. { Measurement Flare }
  172.     cmFlare0                    = $00000000;
  173.     cmFlare100                    = $00000001;
  174.  
  175. { Measurement Geometry    }
  176.     cmGeometryUnknown            = $00000000;
  177.     cmGeometry045or450            = $00000001;
  178.     cmGeometry0dord0            = $00000002;
  179.  
  180. { Standard Observer    }
  181.     cmStdobsUnknown                = $00000000;
  182.     cmStdobs1931TwoDegrees        = $00000001;
  183.     cmStdobs1964TenDegrees        = $00000002;
  184.  
  185. { Standard Illuminant }
  186.     cmIlluminantUnknown            = $00000000;
  187.     cmIlluminantD50                = $00000001;
  188.     cmIlluminantD65                = $00000002;
  189.     cmIlluminantD93                = $00000003;
  190.     cmIlluminantF2                = $00000004;
  191.     cmIlluminantD55                = $00000005;
  192.     cmIlluminantA                = $00000006;
  193.     cmIlluminantEquiPower        = $00000007;
  194.     cmIlluminantF8                = $00000008;
  195.  
  196. { Spot Function Value }
  197.     cmSpotFunctionUnknown        = 0;
  198.     cmSpotFunctionDefault        = 1;
  199.     cmSpotFunctionRound            = 2;
  200.     cmSpotFunctionDiamond        = 3;
  201.     cmSpotFunctionEllipse        = 4;
  202.     cmSpotFunctionLine            = 5;
  203.     cmSpotFunctionSquare        = 6;
  204.     cmSpotFunctionCross            = 7;
  205.  
  206. { Color Space Signatures }
  207.     cmXYZData                    = 'XYZ ';
  208.     cmLabData                    = 'Lab ';
  209.     cmLuvData                    = 'Luv ';
  210.     cmYxyData                    = 'Yxy ';
  211.     cmRGBData                    = 'RGB ';
  212.     cmGrayData                    = 'GRAY';
  213.     cmHSVData                    = 'HSV ';
  214.     cmHLSData                    = 'HLS ';
  215.     cmCMYKData                    = 'CMYK';
  216.     cmCMYData                    = 'CMY ';
  217.     cmMCH5Data                    = 'MCH5';
  218.     cmMCH6Data                    = 'MCH6';
  219.     cmMCH7Data                    = 'MCH7';
  220.     cmMCH8Data                    = 'MCH8';
  221.  
  222. { profileClass enumerations }
  223.     cmInputClass                = 'scnr';
  224.     cmDisplayClass                = 'mntr';
  225.     cmOutputClass                = 'prtr';
  226.     cmLinkClass                    = 'link';
  227.     cmAbstractClass                = 'abst';
  228.     cmColorSpaceClass            = 'spac';
  229.  
  230. { platform enumerations }
  231.     cmMacintosh                    = 'APPL';
  232.     cmMicrosoft                    = 'MSFT';
  233.     cmSolaris                    = 'SUNW';
  234.     cmSiliconGraphics            = 'SGI ';
  235.     cmTaligent                    = 'TGNT';
  236.  
  237. { ColorSync 1.0 elements }
  238.     cmCS1ChromTag                = 'chrm';
  239.     cmCS1TRCTag                    = 'trc ';
  240.     cmCS1NameTag                = 'name';
  241.     cmCS1CustTag                = 'cust';
  242.  
  243. { General element data types }
  244.  
  245. TYPE
  246.     CMDateTime = RECORD
  247.         year:                    INTEGER;
  248.         month:                    INTEGER;
  249.         dayOfTheMonth:            INTEGER;
  250.         hours:                    INTEGER;
  251.         minutes:                INTEGER;
  252.         seconds:                INTEGER;
  253.     END;
  254.  
  255.     CMFixedXYZColor = RECORD
  256.         X:                        Fixed;
  257.         Y:                        Fixed;
  258.         Z:                        Fixed;
  259.     END;
  260.  
  261.     CMXYZComponent = INTEGER;
  262.  
  263.     CMXYZColor = RECORD
  264.         X:                        CMXYZComponent;
  265.         Y:                        CMXYZComponent;
  266.         Z:                        CMXYZComponent;
  267.     END;
  268.  
  269.     CM2Header = RECORD
  270.         size:                    LONGINT;                                { This is the total size of the Profile }
  271.         CMMType:                OSType;                                    { CMM signature,  Registered with CS2 consortium  }
  272.         profileVersion:            LONGINT;                                { Version of CMProfile format }
  273.         profileClass:            OSType;                                    { input, display, output, devicelink, abstract, or color conversion profile type }
  274.         dataColorSpace:            OSType;                                    { color space of data }
  275.         profileConnectionSpace:    OSType;                                    { profile connection color space }
  276.         dateTime:                CMDateTime;                                { date and time of profile creation }
  277.         CS2profileSignature:    OSType;                                    { 'acsp' constant ColorSync 2.0 file ID }
  278.         platform:                OSType;                                    { primary profile platform, Registered with CS2 consortium }
  279.         flags:                    LONGINT;                                { profile flags }
  280.         deviceManufacturer:        OSType;                                    { Registered with CS2 consortium }
  281.         deviceModel:            LONGINT;                                { Registered with CS2 consortium }
  282.         deviceAttributes:        ARRAY [0..1] OF LONGINT;                { Attributes like paper type }
  283.         renderingIntent:        LONGINT;                                { preferred rendering intent of tagged object }
  284.         white:                    CMFixedXYZColor;                        { profile illuminant }
  285.         reserved:                ARRAY [0..47] OF CHAR;                    { reserved for future use }
  286.     END;
  287.  
  288.     CMTagRecord = RECORD
  289.         tag:                    OSType;                                    { Registered with CS2 consortium }
  290.         elementOffset:            LONGINT;                                { Relative to start of CMProfile }
  291.         elementSize:            LONGINT;
  292.     END;
  293.  
  294.     CMTagElemTable = RECORD
  295.         count:                    LONGINT;
  296.         tagList:                ARRAY [0..0] OF CMTagRecord;            { Variable size }
  297.     END;
  298.  
  299. { External 0x02002001 CMProfile }
  300.     CM2Profile = RECORD
  301.         header:                    CM2Header;
  302.         tagTable:                CMTagElemTable;
  303.         elemData:                ARRAY [0..0] OF CHAR;                    { Tagged element storage. Variable size }
  304.     END;
  305.  
  306.     CM2ProfilePtr = ^CM2Profile;
  307.     CM2ProfileHandle = ^CM2ProfilePtr;
  308.  
  309. { Tag Type Definitions }
  310.     CMCurveType = RECORD
  311.         typeDescriptor:            OSType;                                    { 'curv' }
  312.         reserved:                LONGINT;                                { fill with 0x00 }
  313.         countValue:                LONGINT;                                { number of entries in table that follows }
  314.         data:                    ARRAY [0..0] OF INTEGER;                { Tagged element storage. Variable size }
  315.     END;
  316.  
  317.     CMDataType = RECORD
  318.         typeDescriptor:            OSType;                                    { 'data' }
  319.         reserved:                LONGINT;                                { fill with 0x00 }
  320.         dataFlag:                LONGINT;                                { 0 = ASCII, 1 = binary }
  321.         data:                    ARRAY [0..0] OF CHAR;                    { Tagged element storage. Variable size }
  322.     END;
  323.  
  324.     CMDateTimeType = RECORD
  325.         typeDescriptor:            OSType;                                    { 'dtim' }
  326.         reserved:                LONGINT;
  327.         dateTime:                CMDateTime;
  328.     END;
  329.  
  330.     CMLut16Type = RECORD
  331.         typeDescriptor:            OSType;                                    { 'mft2' }
  332.         reserved:                LONGINT;                                { fill with 0x00 }
  333.         inputChannels:            SInt8; { unsigned char }                { Number of input channels }
  334.         outputChannels:            SInt8; { unsigned char }                { Number of output channels }
  335.         gridPoints:                SInt8; { unsigned char }                { Number of clutTable grid points }
  336.         reserved2:                SInt8; { unsigned char }                { fill with 0x00 }
  337.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                { }
  338.         inputTableEntries:        INTEGER;                                { }
  339.         outputTableEntries:        INTEGER;                                { }
  340.         inputTable:                ARRAY [0..0] OF INTEGER;                { Variable size }
  341.         CLUT:                    ARRAY [0..0] OF INTEGER;                { Variable size }
  342.         outputTable:            ARRAY [0..0] OF INTEGER;                { Variable size }
  343.     END;
  344.  
  345.     CMLut8Type = RECORD
  346.         typeDescriptor:            OSType;                                    { 'mft1' }
  347.         reserved:                LONGINT;                                { fill with 0x00 }
  348.         inputChannels:            SInt8; { unsigned char }                { }
  349.         outputChannels:            SInt8; { unsigned char }                { }
  350.         gridPoints:                SInt8; { unsigned char }                { }
  351.         reserved2:                SInt8; { unsigned char }                { fill with 0x00 }
  352.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                { }
  353.         inputTable:                ARRAY [0..255] OF SInt8; { unsigned char } { fixed size of 256 }
  354.         CLUT:                    ARRAY [0..0] OF SInt8; { unsigned char } { Variable size }
  355.         outputTable:            ARRAY [0..255] OF SInt8; { unsigned char } { fixed size of 256 }
  356.     END;
  357.  
  358.     CMMeasurementType = RECORD
  359.         typeDescriptor:            OSType;                                    { 'meas' }
  360.         reserved:                LONGINT;                                { fill with 0x00 }
  361.         standardObserver:        LONGINT;                                { 0 : unknown, 1 : CIE 1931, 2 : CIE 1964 }
  362.         backingXYZ:                CMFixedXYZColor;                        { absolute XYZ values of backing }
  363.         geometry:                LONGINT;                                { 0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 }
  364.         flare:                    LONGINT;                                { 0 : 0%, 1 : 100% flare }
  365.         illuminant:                LONGINT;                                { standard illuminant }
  366.     END;
  367.  
  368.     CMNamedColorType = RECORD
  369.         typeDescriptor:            OSType;                                    { 'ncol' }
  370.         reserved:                LONGINT;                                { fill with 0x00 }
  371.         vendorFlag:                LONGINT;                                { }
  372.         count:                    LONGINT;                                { count of named colors in array that follows }
  373.         prefixName:                ARRAY [0..0] OF SInt8; { unsigned char } { Variable size, max = 32, to access fields after this one, have to count bytes }
  374.         suffixName:                ARRAY [0..0] OF SInt8; { unsigned char } { Variable size, max = 32 }
  375.         colorName:            RECORD
  376.                 rootName:                        ARRAY [0..0] OF SInt8; { unsigned char } { Variable size, max = 32 }
  377.                 colorCoords:                    ARRAY [0..0] OF SInt8; { unsigned char } { Variable size  }
  378.             END;
  379.  
  380.                                                         { Variable size  }
  381.     END;
  382.  
  383.     CMTextDescriptionType = RECORD
  384.         typeDescriptor:            OSType;                                    { 'desc' }
  385.         reserved:                LONGINT;                                { fill with 0x00 }
  386.         ASCIICount:                LONGINT;                                { the count of "bytes" }
  387.         ASCIIName:                ARRAY [0..1] OF SInt8; { unsigned char } { Variable size, to access fields after this one, have to count bytes }
  388.         UniCodeCode:            LONGINT;
  389.         UniCodeCount:            LONGINT;                                { the count of characters, each character has two bytes }
  390.         UniCodeName:            ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  391.         ScriptCodeCode:            INTEGER;
  392.         ScriptCodeCount:        SInt8; { unsigned char }                { the count of "bytes" }
  393.         ScriptCodeName:            ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  394.     END;
  395.  
  396.     CMTextType = RECORD
  397.         typeDescriptor:            OSType;                                    { 'text' }
  398.         reserved:                LONGINT;                                { fill with 0x00 }
  399.         text:                    ARRAY [0..0] OF SInt8; { unsigned char } { count of text is obtained from tag size element }
  400.     END;
  401.  
  402.     CMScreeningType = RECORD
  403.         typeDescriptor:            OSType;                                    { 'scrn' }
  404.         reserved:                LONGINT;                                { fill with 0x00 }
  405.         screeningFlag:            LONGINT;                                { bit 0 : use printer default screens, bit 1 : inch/cm }
  406.         channelCount:            LONGINT;
  407.         channelScreening:            RECORD
  408.                 frequency:                        Fixed;
  409.                 angle:                            Fixed;
  410.                 sportFunction:                    LONGINT;
  411.             END;
  412.  
  413.                                                 { Variable size }
  414.     END;
  415.  
  416.     CMSignatureType = RECORD
  417.         typeDescriptor:            OSType;                                    { 'sig ' }
  418.         reserved:                LONGINT;                                { fill with 0x00 }
  419.         signature:                OSType;
  420.     END;
  421.  
  422.     CMS15Fixed16ArrayType = RECORD
  423.         typeDescriptor:            OSType;                                    { 'sf32' }
  424.         reserved:                LONGINT;                                { fill with 0x00 }
  425.         value:                    ARRAY [0..0] OF Fixed;                    { Variable size }
  426.     END;
  427.  
  428.     CMU16Fixed16ArrayType = RECORD
  429.         typeDescriptor:            OSType;                                    { 'uf32' }
  430.         reserved:                LONGINT;                                { fill with 0x00 }
  431.         value:                    ARRAY [0..0] OF LONGINT;                { Variable size }
  432.     END;
  433.  
  434.     CMUInt16ArrayType = RECORD
  435.         typeDescriptor:            OSType;                                    { 'ui16' }
  436.         reserved:                LONGINT;                                { fill with 0x00 }
  437.         value:                    ARRAY [0..0] OF INTEGER;                { Variable size }
  438.     END;
  439.  
  440.     CMUInt32ArrayType = RECORD
  441.         typeDescriptor:            OSType;                                    { 'ui32' }
  442.         reserved:                LONGINT;                                { fill with 0x00 }
  443.         value:                    ARRAY [0..0] OF LONGINT;                { Variable size }
  444.     END;
  445.  
  446.     CMUInt64ArrayType = RECORD
  447.         typeDescriptor:            OSType;                                    { 'ui64' }
  448.         reserved:                LONGINT;                                { fill with 0x00 }
  449.         value:                    ARRAY [0..0] OF LONGINT;                { Variable size (x2) }
  450.     END;
  451.  
  452.     CMUInt8ArrayType = RECORD
  453.         typeDescriptor:            OSType;                                    { 'ui08' }
  454.         reserved:                LONGINT;                                { fill with 0x00 }
  455.         value:                    ARRAY [0..0] OF SInt8; { unsigned char } { Variable size }
  456.     END;
  457.  
  458.     CMViewingConditionsType = RECORD
  459.         typeDescriptor:            OSType;                                    { 'view' }
  460.         reserved:                LONGINT;                                { fill with 0x00 }
  461.         illuminant:                CMFixedXYZColor;                        { absolute XYZs of illuminant  in cd/m^2 }
  462.         surround:                CMFixedXYZColor;                        { absolute XYZs of surround in cd/m^2 }
  463.         stdIlluminant:            LONGINT;                                { see definitions of std illuminants }
  464.     END;
  465.  
  466.     CMXYZType = RECORD
  467.         typeDescriptor:            OSType;                                    { 'XYZ ' }
  468.         reserved:                LONGINT;                                { fill with 0x00 }
  469.         XYZ:                    ARRAY [0..0] OF CMFixedXYZColor;        { variable size XYZ tristimulus values }
  470.     END;
  471.  
  472. { Profile sequence description type }
  473.     CMProfileSequenceDescType = RECORD
  474.         typeDescriptor:            OSType;                                    { 'pseq ' }
  475.         reserved:                LONGINT;                                { fill with 0x00 }
  476.         count:                    LONGINT;                                { Number of descriptions
  477.                                                          * variable size fields to follow, to access them, must count bytes }
  478.         profileDescription:            RECORD
  479.                 deviceMfg:                        OSType;                            { Device Manufacturer }
  480.                 deviceModel:                    OSType;                            { Decvice Model }
  481.                 attributes:                        ARRAY [0..1] OF LONGINT;        { Device attributes }
  482.                 technology:                        OSType;                            { Technology signature }
  483.                 mfgDescASCIICount:                LONGINT;                        { the count of "bytes" }
  484.                 mfgDescASCIIName:                ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  485.                 mfgDescUniCodeCode:                LONGINT;
  486.                 mfgDescUniCodeCount:            LONGINT;                        { the count of characters, each character has two bytes }
  487.                 mfgDescUniCodeName:                ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  488.                 mfgDescScriptCodeCode:            LONGINT;
  489.                 mfgDescScriptCodeCount:            LONGINT;                        { the count of "bytes" }
  490.                 mfgDescScriptCodeName:            ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  491.                 modelDescASCIICount:            LONGINT;                        { the count of "bytes" }
  492.                 modelDescASCIIName:                ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  493.                 modelDescUniCodeCode:            LONGINT;
  494.                 modelDescUniCodeCount:            LONGINT;                        { the count of characters, each character has two bytes }
  495.                 modelDescUniCodeName:            ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  496.                 modelDescScriptCodeCode:        INTEGER;
  497.                 modelDescScriptCodeCount:        SInt8; { unsigned char }        { the count of "bytes" }
  498.                 modelDescScriptCodeName:        ARRAY [0..1] OF SInt8; { unsigned char } { Variable size }
  499.             END;
  500.  
  501.  
  502.     END;
  503.  
  504. { Under color removal, black generation type }
  505.     CMUcrBgType = RECORD
  506.         typeDescriptor:            OSType;                                    { 'bfd  ' }
  507.         reserved:                LONGINT;                                { fill with 0x00 }
  508.         ucrCount:                LONGINT;                                { Number of UCR entries }
  509.         ucrValues:                ARRAY [0..0] OF INTEGER;                { variable size }
  510.         bgCount:                LONGINT;                                { Number of BG entries }
  511.         bgValues:                ARRAY [0..0] OF INTEGER;                { variable size }
  512.         ucrbgASCII:                ARRAY [0..0] OF SInt8; { unsigned char } { null terminated ASCII string }
  513.     END;
  514.  
  515.     CMIntentCRDVMSize = RECORD
  516.         renderingIntent:        LONGINT;                                { rendering intent }
  517.         VMSize:                    LONGINT;                                { VM size taken up by the CRD }
  518.     END;
  519.  
  520.     CMPS2CRDVMSizeType = RECORD
  521.         typeDescriptor:            OSType;                                    { 'psvm' }
  522.         reserved:                LONGINT;                                { fill with 0x00 }
  523.         count:                    LONGINT;                                { number of intent entries }
  524.         intentCRD:                ARRAY [0..0] OF CMIntentCRDVMSize;        { variable size }
  525.     END;
  526.  
  527. {**********************************************************************}
  528. {************** ColorSync 1.0 profile specification *******************}
  529. {**********************************************************************}
  530.  
  531. CONST
  532.     cmGrayResponse                = 0;
  533.     cmRedResponse                = 1;
  534.     cmGreenResponse                = 2;
  535.     cmBlueResponse                = 3;
  536.     cmCyanResponse                = 4;
  537.     cmMagentaResponse            = 5;
  538.     cmYellowResponse            = 6;
  539.     cmUcrResponse                = 7;
  540.     cmBgResponse                = 8;
  541.     cmOnePlusLastResponse        = 9;
  542.  
  543. { Device types }
  544.     cmMonitorDevice                = 'mntr';
  545.     cmScannerDevice                = 'scnr';
  546.     cmPrinterDevice                = 'prtr';
  547.  
  548.  
  549. TYPE
  550.     CMIString = RECORD
  551.         theScript:                ScriptCode;
  552.         theString:                Str63;
  553.     END;
  554.  
  555. { Profile options }
  556.  
  557. CONST
  558.     cmPerceptualMatch            = $0000;                        { Default. For photographic images }
  559.     cmColorimetricMatch            = $0001;                        { Exact matching when possible }
  560.     cmSaturationMatch            = $0002;                        { For solid colors }
  561.  
  562. { Profile flags }
  563.     cmNativeMatchingPreferred    = $00000001;                    { Default to native not preferred }
  564.     cmTurnOffCache                = $00000002;                    { Default to turn on CMM cache }
  565.  
  566.     
  567. TYPE
  568.     CMMatchOption = LONGINT;
  569.  
  570.     CMMatchFlag = LONGINT;
  571.  
  572.     CMHeader = RECORD
  573.         size:                    LONGINT;
  574.         CMMType:                OSType;
  575.         applProfileVersion:        LONGINT;
  576.         dataType:                OSType;
  577.         deviceType:                OSType;
  578.         deviceManufacturer:        OSType;
  579.         deviceModel:            LONGINT;
  580.         deviceAttributes:        ARRAY [0..1] OF LONGINT;
  581.         profileNameOffset:        LONGINT;
  582.         customDataOffset:        LONGINT;
  583.         flags:                    CMMatchFlag;
  584.         options:                CMMatchOption;
  585.         white:                    CMXYZColor;
  586.         black:                    CMXYZColor;
  587.     END;
  588.  
  589.     CMProfileChromaticities = RECORD
  590.         red:                    CMXYZColor;
  591.         green:                    CMXYZColor;
  592.         blue:                    CMXYZColor;
  593.         cyan:                    CMXYZColor;
  594.         magenta:                CMXYZColor;
  595.         yellow:                    CMXYZColor;
  596.     END;
  597.  
  598.     CMProfileResponse = RECORD
  599.         counts:                    ARRAY [0..8] OF INTEGER;
  600.         data:                    ARRAY [0..0] OF INTEGER;                { Variable size }
  601.     END;
  602.  
  603.     CMProfile = RECORD
  604.         header:                    CMHeader;
  605.         profile:                CMProfileChromaticities;
  606.         response:                CMProfileResponse;
  607.         profileName:            CMIString;
  608.         customData:                ARRAY [0..0] OF CHAR;                    { Variable size }
  609.     END;
  610.  
  611.     CMProfilePtr = ^CMProfile;
  612.     CMProfileHandle = ^CMProfilePtr;
  613.  
  614. {$IFC OLDROUTINENAMES }
  615.  
  616. CONST
  617.     kCMApplProfileVersion        = cmCS1ProfileVersion;
  618.  
  619.     grayResponse                = cmGrayResponse;
  620.     redResponse                    = cmRedResponse;
  621.     greenResponse                = cmGreenResponse;
  622.     blueResponse                = cmBlueResponse;
  623.     cyanResponse                = cmCyanResponse;
  624.     magentaResponse                = cmMagentaResponse;
  625.     yellowResponse                = cmYellowResponse;
  626.     ucrResponse                    = cmUcrResponse;
  627.     bgResponse                    = cmBgResponse;
  628.     onePlusLastResponse            = cmOnePlusLastResponse;
  629.  
  630.     rgbData                        = cmRGBData;
  631.     cmykData                    = cmCMYKData;
  632.     grayData                    = cmGrayData;
  633.     xyzData                        = cmXYZData;
  634.  
  635.     monitorDevice                = cmMonitorDevice;
  636.     scannerDevice                = cmScannerDevice;
  637.     printerDevice                = cmPrinterDevice;
  638.  
  639.     
  640. TYPE
  641.     XYZComponent = INTEGER;
  642.  
  643.     XYZColor = CMXYZColor;
  644.  
  645.     CMResponseData = INTEGER;
  646.  
  647.     IString = CMIString;
  648.  
  649.     CMResponseColor = LONGINT;
  650.  
  651.     responseColor = CMResponseColor;
  652.  
  653. {$ENDC}
  654.  
  655. { $ALIGN RESET}
  656. { $POP}
  657.  
  658. {$ENDC} {__CMICCPROFILE__}
  659.  
  660.  IMPLEMENTATION
  661.  END.
  662.  
  663.